package com.thb.pay.engine.request.impl;

import com.thb.pay.engine.enums.ConditionTypeEnum;
import com.thb.pay.engine.request.RuleCheckRequest;
import com.thb.pay.engine.request.RuleConditionRequest;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.List;

/**
 * BaseRuleConditionRequest
 *
 * <p>抽象类实现 基础规则条件请求内容</p>
 *
 * @author lucky
 * @since 2019-11-08
 */
public abstract class BaseRuleConditionRequest<ID extends Serializable> extends BaseRuleNode<ID> implements RuleConditionRequest<ID> {


    protected ConditionTypeEnum conditionType;

    protected RuleCheckRequest ruleCheckRequest;

    protected List<RuleConditionRequest<ID>> childConditionList;

    public ConditionTypeEnum getConditionType() {
        return conditionType;
    }

    public void setConditionType(ConditionTypeEnum conditionType) {
        this.conditionType = conditionType;
    }

    public RuleCheckRequest getRuleCheckRequest() {
        return ruleCheckRequest;
    }

    public void setRuleCheckRequest(RuleCheckRequest ruleCheckRequest) {
        this.ruleCheckRequest = ruleCheckRequest;
    }

    public List<RuleConditionRequest<ID>> getChildConditionList() {
        return childConditionList;
    }

    public void setChildConditionList(List<RuleConditionRequest<ID>> childConditionList) {
        this.childConditionList = childConditionList;
    }

    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, ToStringStyle.SIMPLE_STYLE);
    }

}
